<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    var s = new Set();
    var x = { id: 1 };
    var y = { id: 2 };
    s.add(x).add(y);

    var keys = [...s.keys()],
        vals = [...s.values()],
        entries = [...s.entries()];

    console.log(
        keys[0] === x,
        keys[1] === y,
        vals[0] === x,
        vals[1] === y,
        entries[0][0] === x,
        entries[0][1] === x,
        entries[1][0] === y,
        entries[1][1] === y
    )



</script>

</html>